import java.util.Arrays;
import java.util.Scanner;

public class Test1 {

    public static void main8(String[] args) {
        int[][] array=new int[][] {{1,2,3},{1,2,3,4,5,6}};
        System.out.println(array);
        System.out.println("=============");
        System.out.println(array[0]);
        System.out.println(array[1]);
        System.out.println("=============");
        System.out.println(Arrays.toString(array));
        System.out.println(Arrays.deepToString(array));
        System.out.println(Arrays.toString(array[0]));
        System.out.println(Arrays.toString(array[1]));
        System.out.println("=============");
        System.out.println(array[0][1]);
        System.out.println("=============");
        System.out.println(array.length);
        System.out.println(array[0].length);
    }

    public static void main(String[] args) {
        Date date2 = new Date();
        date2.printf();
    }

    public static void main6(String[] args) {
        int[] array = { 1,1,2,2,2,2 };
        Arrays.sort(array);
        System.out.println(array[array.length/2]);
    }

    public static void main5(String[] args) {
        int[] array = { 1,2,3,4,5,6 };
        int i = 0;
        int j = array.length - 1;
        while(i < j) {
            while (i < j && array[i] % 2 != 0) {
                i++;
            }
            while (i < j && array[j] % 2 == 0) {
                j--;
            }
            int tmp = array[i];
            array[i] = array[j];
            array[j] = tmp;
        }
        System.out.println(Arrays.toString(array));
    }



    public static boolean sucodd(int[] array){
        int count = 0;
        for (int i = 0; i < array.length; i++) {
            if((array[i] & 1) != 1){
                count = 0;
            }else {
                count++;
            }
            if(count == 3)
                return true;
        }
        return false;
    }
    public static void main4(String[] args) {
        int[] array = { 1,2,34,3,4,5,7,23,12 };
        System.out.println(sucodd(array));
    }

    public static void main3(String[] args) {
        int[] array = { 2,2,1,1,1,2,2 };
        for (int i = 0; i < array.length; i++) {
            int count = 1;
            for (int j = i+1; j < array.length; j++) {
                if(array[i] == array[j]) {
                    count++;
                }
            }
            if(count > array.length/2){
                System.out.println(array[i]);
            }
        }
    }


    public static void main2(String[] args) {
        int[] array = { 2,2,1,4,1 };
        int ret = 0;
        for (int i = 0; i < array.length; i++) {
            ret ^= array[i];
        }
        System.out.println(ret);
    }


    public static void main1(String[] args) {
        int[] nums = { 2,7,11,15 };
        Scanner sc = new Scanner(System.in);
        int target = sc.nextInt();
        for (int i = 0; i < nums.length; i++) {
            for (int j = i+1; j < nums.length; j++) {
                if (nums[i] + nums[j] == target) {
                    System.out.println("["+i+","+j+"]");
                }
            }
        }
    }
}
